<?php
class CodeSpace_Service_Anakin_Api extends CodeSpace_ServiceClient_Abstract

{
    
    public function __construct()
    {
        parent::__construct();
    }
    
    public function getSubjectHeading()
    {
        
    }
    
    public function getSubjecHeadings()
    {
        $this->setRequestParameter('type', 'SELECT');
        $result = $this->_client->restGet('/service/subjects', $this->getRequestParameters());
        
        if ($result->getStatus() == 200)
        {
            return json_decode($result->getBody());
        }
        else if ($result->getStatus() == 400 || $result->getStatus() == 401)
        {
            return false;
        }
    }
    
    public function addSubjectHeading()
    {
        
    }
    
    public function editSubjectHeading()
    {
        
    }
    
    public function deleteSubjectHeading()
    {
        
    }
    
    public function sayHello($name)
    {
        $path = '/index/index';
        $params = array(
            'method' => 'sayHello',
            'name' => $name
        );
        $response = $this->_client->restGet($path, $params);
        //$x = new Zend_Http_Response($code, $headers);
        var_dump($response);        
        return $response->getBody();    
    }
    
}